FROM core.harbor.domain/git/golang:alpine3.15 as alpine
RUN mkdir /build
ADD . /build/
#RUN apk add -U --no-cache ca-certificates
WORKDIR /build
RUN go build -o ./test

FROM scratch
#COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=alpine /build/test /bin/test
ENTRYPOINT ["/bin/test"]
